/* 
描述：UserServiceImpl类实现了用户服务的业务逻辑，负责处理用户注册、登录、信息查询和更新等核心功能，
是问答社区用户管理模块的关键服务实现。
完成人：何艺珲
完成时间: 2025/04/26
*/
package com.jiesenhe.qacommunity.service.impl;

import com.jiesenhe.qacommunity.mapper.UserMapper;
import com.jiesenhe.qacommunity.pojo.User;
import com.jiesenhe.qacommunity.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public User getUsernameAndPassword(String username, String password) {
        return userMapper.getUsernameAndPassword(username,password);
    }
    @Override
    public List<User> registerCheck(User user) {
        return userMapper.registerCheck(user);
    }

    @Override
    public int registerInsert(User user) {
        return userMapper.registerInsert(user);
    }
    @Override
    public int updateUserInfo(User user) {
        return userMapper.updateUserInfo(user);
    }

    @Override
    public User getUserInfo(int id) {
        return userMapper.getUserInfo(id);
    }

}
